import { connect } from "react-redux";

import Header from "../../component/home/Header.jsx";
import { setPageTitle, setLocation } from "../../action/system";

function mapStateToProps(state) {
    return {
        location: state.getIn(["client", "location"]),
        pageTitle: state.getIn(["client", "pageTitle"])
    }
}

function mapDispatchToProps(dispatch) {
    return {
        setPageTitle: (title) => dispatch(setPageTitle(title)),
        setLocation: (location) => dispatch(setLocation(location))
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(Header);